<template>
  <div>
    <button @click="toP">sun click!</button>
    <p>aaaaaaa</p>
  </div>
</template>

<script>
import {watch, toRefs, toRef} from "vue";


export default {
  name: "sun",
  props: {
    modelValue: String,
    modelModifiers: {
      default: () => {
      }
    }
  },
  emits: {
    sunChanged({name, age}) {
      if (typeof age == "number") {
        return true
      } else {
        return false
      }
    },
    "update:modelValue"() {
      return true
    },
    // test(){
    //   return true
    // }
  },
  setup(props, context) {
    console.log(props); //{modelValue: "hello", modelModifiers: {capitalize:true}}
    const toP = () => {
      console.log(this)
    };
    return {toP}
  }
}
</script>

<style>

</style>